def setup
  size 200, 200
  noStroke
  colorMode HSB, 360, height, height
  @bar_width = 5
end

def draw
  x = @bar_width * mouseX.div(@bar_width)
  fill x, height, mouseY
  rect x, 0, @bar_width, height
end